package iedcyt.acute.dataAccess.dao.maauco;


import iedcyt.acute.dataAccess.domain.maauco.Au0;
import iedcyt.acute.dataAccess.domain.maauco.Co0;
import iedcyt.acute.dataAccess.utils.Pair;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.ResultSetExtractor;



public class AupioResultSetExtractor implements ResultSetExtractor<Pair<Au0, Co0>> {

	@Override
	public Pair<Au0, Co0> extractData(ResultSet rs) throws SQLException {
		
		int idno = rs.getInt(1);
		
		Au0 au0 = new Au0(idno, rs.getInt(2), rs.getString(4), null/*rs.getString(4)*/);
		Co0 co0 = new Co0(idno, rs.getInt(3), 0, rs.getString(5), "",
				"", rs.getString(6), rs.getString(7), 
				rs.getString(8), rs.getString(9), rs.getString(10), "");
		
		Pair<Au0, Co0> pair = new Pair<Au0, Co0>(au0, co0);
		
		return pair;
	}

}
